﻿using Microsoft.Phone.Controls;
using ProtetoresDaMata.Data;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Net;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Documents;
using System.Windows.Input;
using System.Windows.Media;
using System.Windows.Media.Animation;
using System.Windows.Shapes;
using ProtetoresDaMata.Smarts;


namespace ProtetoresDaMata
{
    public partial class RankingPage : PhoneApplicationPage
    {
        public RankingPage()
        {
            InitializeComponent();
            LoadList();
        }

        private void LoadList()
        {
            Helpers helpers = new Helpers();

            List<Score> _score = new List<Score>();
            _score = helpers.GetTop20Scores();

            if (_score != null && _score.Count > 0)
            {
                RankingList.Items.Clear();
                RankingList.ItemsSource = _score;
            }
        }
    }
}